package com.softserveinc.ita.kaiji.dao;

import com.softserveinc.ita.kaiji.model.User;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @author Alexander Vorobyov
 * @version 1.0
 * @since 20.08.2014
 */
public interface UserDAO extends JpaRepository<User, Integer>, UserDAOCustom {

    /**
     * Returns user from repository by nickname
     *
     * @param nickname nickname of user
     * @return user from repository by nickname
     */
    public User findByNickname(String nickname);

    /**
     * Returns user from repository by email
     *
     * @param email nickname of user
     * @return user from repository by email
     */
    public User findByEmail(String email);

}
